<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>九九乘法表</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f0f0f0;
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            justify-content: center;
            height: 100vh;
            margin: 0;
            padding: 20px;
        }
        h1 {
            margin-bottom: 20px;
            text-align: left;
        }
        table {
            border-collapse: collapse;
            background-color: #fff;
            margin-top: 20px;
        }
        th, td {
            border: 1px solid #ddd;
            padding: 8px;
            text-align: left;
        }
        th {
            background-color: #ddd;
        }
        .odd-row {
            background-color: #ddd;
        }
    </style>
</head>
<body>
    <h1>九九乘法表</h1>
    <table id="multiplicationTable"></table>
    <script>
        function generateMultiplicationTable() {
            const table = document.getElementById('multiplicationTable');
            for (let i = 1; i <= 9; i++) {
                const row = document.createElement('tr');
                if (i % 2 !== 0) {
                    row.classList.add('odd-row');
                }
                for (let j = 1; j <= i; j++) {
                    const cell = document.createElement('td');
                    cell.textContent = `${j}*${i}=${j * i}`;
                    row.appendChild(cell);
                }
                table.appendChild(row);
            }
        }
        generateMultiplicationTable();
    </script>
</body>
</html>